(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/work/contract/detail" ], {
    "0ce5": function(t, n, e) {},
    "1a36": function(t, n, e) {
        e.d(n, "b", function() {
            return o;
        }), e.d(n, "c", function() {
            return c;
        }), e.d(n, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, c = [];
    },
    "41e5": function(t, n, e) {
        e.r(n);
        var o, c = e("1a36"), i = e("f0da");
        for (o in i) "default" !== o && function(t) {
            e.d(n, t, function() {
                return i[t];
            });
        }(o);
        e("6957");
        var a = e("f0c5"), c = Object(a.a)(i.default, c.b, c.c, !1, null, null, null, !1, c.a, void 0);
        n.default = c.exports;
    },
    6957: function(t, n, e) {
        var o = e("0ce5");
        e.n(o).a;
    },
    ad82: function(t, n, o) {
        (function(t) {
            o("767a"), e(o("66fd"));
            var n = e(o("41e5"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, t(n.default);
        }).call(this, o("543d").createPage);
    },
    d8ef: function(t, o, c) {
        (function(e) {
            function n(n, t) {
                var e, o = Object.keys(n);
                return Object.getOwnPropertySymbols && (e = Object.getOwnPropertySymbols(n), t && (e = e.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(n, t).enumerable;
                })), o.push.apply(o, e)), o;
            }
            Object.defineProperty(o, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    return {
                        isLoading: 1,
                        contract_id: 0,
                        house: {},
                        contract: {},
                        bill_list: {},
                        tab_index: 0,
                        staff: {},
                        ext: {
                            id: 0
                        },
                        tj: {
                            total_money: ""
                        },
                        ext_list: [],
                        tab_list: [ {
                            name: "详情"
                        }, {
                            name: "账单"
                        }, {
                            name: "合同"
                        }, {
                            name: "租客"
                        }, {
                            name: "房管"
                        } ]
                    };
                },
                computed: function(o) {
                    for (var t = 1; t < arguments.length; t++) {
                        var c = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? n(Object(c), !0).forEach(function(t) {
                            var n, e;
                            n = o, t = c[e = t], e in n ? Object.defineProperty(n, e, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : n[e] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(c)) : n(Object(c)).forEach(function(t) {
                            Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(c, t));
                        });
                    }
                    return o;
                }({}, (o.default = void 0, c("26cb").mapState)({
                    isLogin: function(t) {
                        return t.user.isLogin;
                    },
                    basicSet: function(t) {
                        return t.init.basicSet;
                    }
                })),
                onLoad: function() {
                    var t = this.$Route.query;
                    this.contract_id = t.contract_id, this.init();
                },
                onReady: function() {},
                methods: {
                    init: function() {
                        var n = this;
                        this.$api("my.contract_detail", {
                            contract_id: n.contract_id
                        }).then(function(t) {
                            0 == t.errno && (n.house = t.data.house, n.contract = t.data.contract, n.bill_list = t.data.bill_list, 
                            n.ext_list = t.data.ext_list, t.data.ext ? n.ext = t.data.ext : n.ext = {
                                id: 0
                            }, t.data.staff && (n.staff = t.data.staff, n.$store.commit("staff", t.data.staff)));
                        });
                    },
                    select_tab: function(t) {
                        this.tab_index = t;
                    },
                    navto_renewal: function() {
                        this.$Router.push({
                            path: "/pages/store/contract/renewal-add",
                            query: {
                                contract_id: this.contract.id
                            }
                        });
                    },
                    call: function() {
                        var t = this.contract.t_tel;
                        e.makePhoneCall({
                            phoneNumber: t
                        });
                    },
                    pre_sdq_imgs: function(t) {
                        var n = this.contract.sdq_imgs;
                        e.previewImage({
                            urls: n,
                            current: t
                        });
                    },
                    pre_sdq_imgs2: function(t) {
                        var n = this.contract.sdq_imgs2;
                        e.previewImage({
                            urls: n,
                            current: t
                        });
                    },
                    pre_contract_imgs: function(t, n) {
                        n = this.ext_list[n].contract_imgs;
                        e.previewImage({
                            urls: n,
                            current: t
                        });
                    },
                    pre_t_imgs: function(t, n) {
                        n = this.ext_list[n], n = [ n.t_zm_img, n.t_fm_img, n.t_sc_img, n.t_sign_img ];
                        e.previewImage({
                            urls: n,
                            current: t
                        });
                    },
                    contract_see: function(t) {
                        e.showLoading({
                            mask: !0,
                            title: "正在加载"
                        }), this.$api("store.contract_see", {
                            ext_id: t.id
                        }).then(function(t) {
                            0 == t.errno && (t = t.data.url, e.downloadFile({
                                url: t,
                                success: function(t) {
                                    t = t.tempFilePath;
                                    e.openDocument({
                                        filePath: t,
                                        showMenu: !0,
                                        success: function(t) {
                                            console.log("打开成功");
                                        },
                                        fail: function(t) {
                                            console.log(t);
                                        }
                                    });
                                },
                                fail: function(t) {
                                    console.log(t);
                                },
                                complete: function(t) {
                                    e.hideLoading();
                                }
                            }));
                        });
                    },
                    contract_cancel: function() {
                        var n = this;
                        e.showModal({
                            title: "提示",
                            content: "确定要取消合约吗？",
                            success: function(t) {
                                t.confirm ? n.$api("store.contract_cancel", {
                                    id: n.contract.id
                                }, "post").then(function(t) {
                                    0 === t.errno ? (0 == t.data.code && n.$tools.toast("操作成功"), n.init()) : n.$tools.toast(t.msg);
                                }) : t.cancel;
                            }
                        });
                    },
                    renewal_cancel: function() {
                        var n = this;
                        e.showModal({
                            title: "提示",
                            content: "确定要取消续租吗？",
                            success: function(t) {
                                t.confirm ? n.$api("store.renewal_cancel", {
                                    ext_id: n.ext.id
                                }, "post").then(function(t) {
                                    0 === t.errno ? (0 == t.data.code && n.$tools.toast("操作成功"), n.init()) : n.$tools.toast(t.msg);
                                }) : t.cancel;
                            }
                        });
                    },
                    contract_confirm: function() {
                        var n = this;
                        e.showModal({
                            title: "提示",
                            content: "确认合同无误？",
                            success: function(t) {
                                t.confirm ? n.$api("store.contract_confirm", {
                                    contract_id: n.contract.id
                                }, "post").then(function(t) {
                                    0 === t.errno ? (0 == t.data.code && n.$tools.toast("操作成功"), n.init()) : n.$tools.toast(t.msg);
                                }) : t.cancel;
                            }
                        });
                    },
                    renewal_confirm: function() {
                        var n = this;
                        e.showModal({
                            title: "提示",
                            content: "确认续租信息无误？",
                            success: function(t) {
                                t.confirm ? n.$api("store.renewal_confirm", {
                                    ext_id: n.ext.id
                                }, "post").then(function(t) {
                                    0 === t.errno ? (0 == t.data.code && n.$tools.toast("操作成功"), n.init()) : n.$tools.toast(t.msg);
                                }) : t.cancel;
                            }
                        });
                    },
                    contract_tui: function(t) {
                        this.$Router.push({
                            path: "/pages/store/contract/tui-apply",
                            query: {
                                contract_id: this.contract.id
                            }
                        });
                    },
                    navto_add: function(t) {
                        this.$Router.push({
                            path: "/pages/store/bill/add",
                            query: {
                                contract_id: this.contract.id
                            }
                        });
                    },
                    navto_detail: function(t) {
                        this.$Router.push({
                            path: "/pages/store/bill/detail",
                            query: {
                                id: t.id
                            }
                        });
                    }
                }
            };
            o.default = t;
        }).call(this, c("543d").default);
    },
    f0da: function(t, n, e) {
        e.r(n);
        var o, c = e("d8ef"), i = e.n(c);
        for (o in c) "default" !== o && function(t) {
            e.d(n, t, function() {
                return c[t];
            });
        }(o);
        n.default = i.a;
    }
}, [ [ "ad82", "common/runtime", "common/vendor" ] ] ]);